<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://doc.hyperf.io
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
 */

namespace App\Controller;

use Hyperf\HttpServer\Annotation\Middleware;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Controller;
use App\Middleware\JTAuthMiddleware;
use App\Middleware\CorsMiddleware;
use App\Service\Auth\UnbindInviteService;
use App\Service\Guild\BindService;
use App\Service\Guild\GuildInfoService;

/**
 * @Controller(prefix="guild")
 */
class GuildController extends AbstractController
{
    /**
     * 公会信息
     * @RequestMapping(path="info", methods="post")
     * @Middleware(CorsMiddleware::class)
     */
    public function info(GuildInfoService $service)
    {
        return $service->response();
    }

    /**
     * 解除被邀请关系
     * @RequestMapping(path="unbind_invite", methods="post")
     * @Middleware(CorsMiddleware::class)
     */
    public function unbind_invite(UnbindInviteService $service)
    {
        return $service->response();
    }
}
